﻿using AiXiu.Model;
using System.Collections.Generic;

namespace AiXiu.IService
{
    public interface IUserService
    {
        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="login">登录信息</param>
        /// <returns>返回用户Id</returns>
        OperResult Register(TBLogins login);

        /// <summary>
        /// 通过用户名登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByUserName(string userName, string password);

        /// <summary>
        /// 通过手机号登录
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByMobile(string mobile, string password);

        /// <summary>
        /// 通过用户编号查找用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        TBUsers FindByUserId(int userId);


        /// <summary>
        /// 更新用户信息(不包含头像)
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        OperResult<TBUsers> EditUser(TBUsers user);

        /// <summary>
        /// 编辑头像
        /// </summary>
        /// <param name="profile"></param>
        /// <returns></returns>
        OperResult<TBUsers> EditAvatar(TBUsers profile);
    }
}
